package com.wnhz.wnmap.audit.controller;


import com.wnhz.wnmap.audit.service.IAuditService;
import com.wnhz.wnmap.common.result.HttpResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "影厅接口")
@RestController
@RequestMapping("/api/audit")
public class AuditController {
    @Autowired
    private IAuditService ias;

    @ApiOperation(value = "reduceSeats",notes = "预定座位接口")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "auditId", value = "影院id", required = true),
            @ApiImplicitParam(name = "seats", value = "作为数量", required = true)
    })
    @PutMapping("/reduceSeats")
    public HttpResp reduceSeats(long auditId, int seats){
        ias.reduceSeats(auditId,seats);
        return HttpResp.success("座位预定完成");
    }

}
